<#assign tit><#if _oper='add'>新增<#else>修改</#if>管理区域</#assign>
<@page.html title=tit>
<script type="text/javascript" src="${_appPath!}/js/cal.js"></script>
<div style="width:750px;">

  <form id="fm_input" method="post" action="<#if _oper='add'>_add<#else>_edit</#if>" onsubmit="return post(this);">
    <div class="kbox">
      <div style="width:350px; float:left;">
        <table class="input">
          <tr>
            <th width="25%">编号</th>
            <td width="75%"><#if _oper='add'><input type="text" name="code" value="${area.code!}" req="编号" size="16" maxlength="20"><span class="require">*</span><#else><input type="hidden" name="code" value="${area.code!}">${area.code!}</#if></td>
          </tr>
          <tr>
            <th>名称</th>
            <td><input type="text" name="chName" value="${area.chName!}" req="名称" size="26" maxlength="50"><span class="require">*</span></td>
          </tr>
          <tr>
            <th>区域类型</th>
            <td><select name="areaType"><#if areaType??><#list areaType as t><option value="${t.id}"<#if area.areaType?? && area.areaType=t.id> selected</#if>>${t.name}</option></#list></#if></select></td>
          </tr>
          <tr>
            <th>启用日期</th>
            <td><input type="text" class="date" name="beginTime" value="${area.beginTime!}" onclick="cal(this);" size="10" maxlength="10"></td>
          </tr>
          <tr>
            <th>结束时间</th>
            <td><input type="text" class="date" name="endTime" value="${area.endTime!}" onclick="cal(this);" size="10" maxlength="10"></td>
          </tr>
          <tr>
            <th>负责人</th>
            <td><select name="chargePerson"><option value=""></option><#if userList??><#list userList as t><option value="${t.userCode!}"<#if area.chargePerson?? && area.chargePerson=t.userCode> selected</#if>>${t.chName!}</option></#list></#if></select></td>
          </tr>
          <tr>
            <th>备注</th>
            <td><textarea name="note" cols="30" rows="3">${area.note!}</textarea></td>
          </tr>
        </table>
      </div>

      <div style="width:300px; float:left; margin-left:10px;">
        <div class="lsinfo" style="margin-top:5px;">包含门店</div>
        <table class="list">
          <tr>
            <th width="13%">选择</th>
            <th width="30%">编号</th>
            <th width="45%" class="left">名称</th>
            <th width="10%"></th>
          </tr>
        </table>
        <div style="height:270px; overflow-y:auto;">
          <table class="list">
            <#if shopList??><#list shopList as t>
            <tr<#if t_index%2==1> class="line2"<#else> class="line1"</#if>>
              <td class="no"><input type="checkbox" name="shops" value="${t.code}" <#if t.status?? && t.status=1> checked</#if>/></td>
              <td>${t.code}</td>
              <td class="left">${t.chName}</td>
            </tr></#list></#if>
          </table>
        </div>
      </div>
      <div class="clear"></div>
    </div>
    <div class="button"><input type="submit" value="提 交"></div>
  </form>
</div>
</@page.html>